<!-- 确认订单 -->
<script>
    (function ($) {

        var confirmOrder = function (order_id) {
            showConfirm("确认订单, 确认后将无法取消", 1, function () {
                $.post(
                        "{AnUrl('order/admin/operation/dealer_action_confirm')}",
                        {
                            order_id: order_id
                        },
                        function (ret) {
                            if (ret && ret.flag === 0) {
                                showMsg(ret.message);
                                setTimeout(function () {
                                    window.location.reload();
                                }, 1500);
                                return;
                            }
                            showMsg(ret.message || "接口请求失败, 请稍后重试");
                        }
                );
            });
        };

        window.order_operation.DEALER_ACTION_CONFIRM = confirmOrder;
        console.log('order_operation.DEALER_ACTION_CONFIRM added! 确认订单');

    })(jQuery);
</script>
<!-- /确认订单 -->